window.onload = function() {
	//			选项卡切换
	var nav1 = document.getElementsByClassName('nav1')[0];
	var nav2 = document.getElementsByClassName('nav2')[0];
	var nav3 = document.getElementsByClassName('nav3')[0];
	var part1 = document.getElementsByClassName('part1')[0];
	var part2 = document.getElementsByClassName('part2')[0];
	var part3 = document.getElementsByClassName('part3')[0];
	nav1.onclick = function() {
		this.className = 'active';
		nav2.className = 'nav2';
		nav3.className = 'nav3';
		part1.style.display = "block";
		part2.style.display = "none";
		part3.style.display = "none";
	}
	nav2.onclick = function() {
		this.className = 'active';
		nav1.className = 'nav1';
		nav3.className = 'nav3';
		part1.style.display = "none";
		part2.style.display = "block";
		part3.style.display = "none";
	}
	nav3.onclick = function() {
		this.className = 'active';
		nav1.className = 'nav1';
		nav2.className = 'nav2';
		part1.style.display = "none";
		part2.style.display = "none";
		part3.style.display = "block";
	}

}

				// 日历表
	var my_date = new Date;
	var my_year = my_date.getFullYear(); //	获取当前年份
	var my_moth = my_date.getMonth() + 1; //	获取当前月份
	var time = document.getElementsByClassName('year')[0];
	var next = document.getElementsByClassName('next')[0];
	var prev = document.getElementsByClassName('prev')[0];
	time.innerHTML = my_year + "年" + my_moth + "月"; //让日历的时间默认为目前的年月
	prev.onclick = function() {
		my_moth = my_moth - 1;
		if(my_moth == 0) {
			my_moth = 12;
			my_year = my_year - 1;
		} else {
			time.innerHTML = my_year + "年" + my_moth + "月";
		}
		time.innerHTML = my_year + "年" + my_moth + "月";
	}
	next.onclick = function() {
		my_moth = my_moth + 1;
		if(my_moth == 13) {
			my_moth = 1;
			my_year = my_year + 1;
		} else {
			time.innerHTML = my_year + "年" + my_moth + "月";
		}
		time.innerHTML = my_year + "年" + my_moth + "月";
	}
		// 判断li是否含有blue类，使得ul可以点击跳转

	var li = document.getElementsByClassName("part3")[0].getElementsByTagName("li");
	var blue = document.getElementsByClassName("blue");
	var ul = document.getElementsByClassName("part3")[0].getElementsByTagName("ul");

	for(var i = 0; i < li.length; i++) {
		if(li[i].classList.contains('blue')) {
			li[i].parentNode.onclick = function() {
				window.location.href = "detail.html"
			}
		} else {}
	}